BUILD_TIME=`date +%Y-%m-%dT%H:%M:%S`
OUTPUT=registry
LDFLAGS=-ldflags "-X main.BuildTime=${BUILD_TIME}"
VER=$(ver)

linux:
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o ./release/${OUTPUT}-amd64-linux main.go

linuxarm:
	CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build ${LDFLAGS} -o ./release/${OUTPUT}-arm64-linux main.go

macos:
	CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o ./release/${OUTPUT}-darwin main.go

window:
	CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o ./release/${OUTPUT}-amd64-window.exe main.go

clean:
	go clean -i -n